<?php
namespace App\common\models\falseData;


class Orders
{

    /**
     * 创建订单
     */
    public static function createOrders()
    {
        $data = [
            'user' => [
                'user_name' => '小宗', // 用户名
                'phone' => '11111111111', // 用户手机
                'id' => 1, // 用户id
            ],
            'goods' => [
                'goods_name' => 'iphone12',
                'goods_img'  => defaultGraph(),
                'integral' => 12,
                'price' => 200.12,
                'add_shop_car_num' => 12,
                'sku' => [
                    ['sku_name' => '名单2', 'id' => 1],
                    ['sku_name' => '名单1', 'id' => 2],
                ],
                'coupon' => [
                    ['type' => 1, 'name' => '优惠满减50', 'id' => 1, 'price' => 50]
                ]
            ],
            'order_id' => 123123123213,
            'creat_at' => 1683189319,
            'pay_mount' => 1209
        ];

        return ['code' => 200, 'msg' => '成功', 'data'=>$data];
    }

    /**
     * 订单列表
     */
    public static function payOrders()
    {
        $data = [
            'id' => 123123123213, // 订单ID
            'creat_at' => 1683189319, // 订单创建时间
            'pay_mount' => 99, //订单实际支付金额
            'integral' => '100', //支付赠送积分
            'self_pickup' => [
                'name' => 'dddd',
                'addres' => '广东省深圳市宝安区',
                'longitude' => '12',
                'latitude' => '33'
            ]
        ];

        return ['code' => 200, 'msg' => '成功', 'data'=>$data];
    }

    /**
     * 订单列表
     */
    public static function getOrdersList()
    {
        $data = [
            [
                'id'=>1,
                'title'=>'订单名', //订单名
                'integral'=>'100', //积分
                'real_sales'=>'100', //销售量
                'stock'=>'100', //库存
                'market_price'=>'100', //原价
                'total_cart'=>'5', //已加入购物车数量
                'is_collect'=>1, //是否收藏
                'option'=>[
                    [
                        'id'=>'5',
                        'title'=>'规格名'
                    ]
                ], //规格数组
            ],

        ];

        return ['total' => 1,'data'=>$data];
    }

    /**
     * 订单详情
     */
    public static function getOrdersDetails()
    {
        $data = [
            'id'=>1,
            'title'=>'订单名', //订单名
            'integral'=>'100', //积分
            'real_sales'=>'100', //销售量
            'stock'=>'100', //库存
            'market_price'=>'100', //原价
            'total_cart'=>'5', //已加入购物车数量
            'is_like'=>0, //是否喜欢
            'is_collect'=>1, //是否收藏
            'comment_num'=>1, //评论数
            'customer_id'=>10, //客服id
            'data_details'=>'<p class="ommon"> <text>\nnodes属性为Array</text> </p>', //富文本填写数据详情:例如<p class="ommon"> <text>\nnodes属性为Array</text> </p>
            'option'=>[
                [
                    'id'=>'5',
                    'title'=>'规格名'
                ]
            ], //规格数组
        ];

        return $data;
    }

    /**
     * 创建订单
     */
    public static function createOrder()
    {

        $data = [];

        return $data;
    }

    /**
     * 支付成功接口
     */
    public static function payOrder()
    {

        $data = [];

        return $data;
    }


}
